#include<string>
#include <iostream>
using namespace std;


int main()
{
    int c = 100;
    int num = 0;
    int spaese1 = 0;
    string line, word = "";
    getline(cin, line);
    line += " ";

    for (char ch : line)
    {
        if (ch == ' ')
        {
            spaese1++;

            if (word == "zero") {
                num += 0 * c;
            } 

            if (word == "one") {
                num += 1 * c;
                
            }
            if (word == "two") {
                num += 2 * c;
                
            }
            if (word == "three") {
                num += 3 * c;
                
            }
            if (word == "four") {
                num += 4 * c;
                
            }
            if (word == "five") {
                num += 5 * c;
                
            }
            if (word == "six") {
                num += 6 * c;
                
            }
            if (word == "seven") {
                num += 7 * c;
                
            }
            if (word == "eight") {
                num += 8 * c;
                
            }
            if (word == "nine") {
                num += 9 * c;
                
            }
            word = "";
            c /= 10;
        }
        else
        {
            word += ch;
        }
    }
    if (num >= 100 && num <= 999 && spaese1 == 3)
        cout << num << endl;
    else
        cout << "Wrong input";
}
